Pad internal buffer to appease -fsanitize=address. format_garmin_xt_decrypt_trk_blk...
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 22 Oct 2013 02:33:15 +0000 (02:33 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 22 Oct 2013 02:33:15 +0000 (02:33 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4635 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/garmin_xt.cc

index 2afb3d3d8dafa46066c80aeda607a4ca09f5ae94..3d46e83212f8522a98e55f1fd68bcb7bac2d9a56 100644 (file)
@@ -235,7 +235,7 @@ format_garmin_xt_proc_strk(void)
   int          Count = 0; // Used to obtain number of read bytes
   int          NumberOfTracks = 0, TracksCompleted = 0; // Number of tracks in the file and number of processed tracks
   uint16_t     trackbytes = 0; // Bytes in track
-  uint8_t      TrackBlock[STRK_BLOCK_SIZE]; // File Block
+  uint8_t      TrackBlock[STRK_BLOCK_SIZE + 1]; // File Block
   uint8_t      ii; // temp variable
   double               Lat = 0, Lon = 0; // wpt data
   double               PrevLat = 0, PrevLon = 0, PrevEle = 0; // wpt data